<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 1. 非箭头函数
        function fn1() {
            console.log(this);
        }
        fn1(); // window

        // 2. 箭头函数
        const fn2 = () => {
            console.log(this);
        }
        // (参数...) => {函数体}
    </script>
</body>
</html>